import java.util.*;
import java.io.BufferedInputStream;
import java.util.Scanner;
//286010056@qq.com
//wang_tian_shun@126.com
//1700871145@qq.com
//1****9GITEE
public class Main {

	public static void main(String[] args) throws Exception {
		
		ArrayList<Integer> results = new ArrayList<Integer>();
		Scanner sc = new Scanner(new BufferedInputStream(System.in));
        while(sc.hasNext()) {
        	int n=sc.nextInt();//n 个烧饼
            int k=sc.nextInt();//k 一次可以放入k个
            if(n<=k) {
            	System.out.println(2);
            }else {
            	if(2*n%k==0)System.out.println(2*n/k);
            	else {
            		System.out.println(2*n/k+1);
            	}
            }
        }
		
		
		sc.close();
	}

}
